package com.aaa.hospital.ManagementEnd.mapper;

import com.aaa.hospital.ManagementEnd.pojo.Registration2;
import com.aaa.hospital.ManagementEnd.util.RegistrationDB;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface RegistrationDao {
    //查询当日预约该医生的患者患者
    List<RegistrationDB>  queryAll(Integer did);
 //调用患者信息
    RegistrationDB  selectById(Integer id);
    //预约患者精准查询，和模糊查询
    List<RegistrationDB>  limitAll(@Param("did") Integer did,@Param("visid") Integer uid, @Param("uname") String uname);
////////////////////////////////////////////////////////////////////////////////////
//正常预约表查询



    //判断该预约患者是否有体检
    Registration2 regById(Integer id);
   //修改预约状态
    boolean upstate(Integer id);
     //修改进程状态，体检前中后
    boolean update_state(@Param("id") Integer id,@Param("state") Integer state);

    //查询当天是否预约过挂号
    List<Registration2> queryBySize(@Param("visid") int visid,@Param("visitdate")  Date visitdate);

}
